#!/bin/bash

# 参数检查
if [ $# -eq 0 ]; then
    echo "Usage: $0 <image_id>"
    exit 1
fi

IMG_ID=$1
IMG_DIR="/home/argo/catkin_ws/src/rads-master/img"
TARGET_FILE="${IMG_DIR}/${IMG_ID}.jpeg"

# 删除文件
if [ -f "$TARGET_FILE" ]; then
    rm -f "$TARGET_FILE"
    echo "Deleted: $TARGET_FILE"
else
    echo "File not found: $TARGET_FILE" >&2
    exit 2
fi

exit 0
